package com.epam.task.thread;

import org.apache.log4j.Logger;

public class Operator {
    public static final Logger logger = Logger.getLogger(Operator.class);
    private boolean isFree = true;
    private String name;
    private String[] descriptions = new String[]{
            "was served",
            "wait answer",
            "hung  up"
    };
    private long duration;

    public Operator(long duration) {
        this.duration = duration;
    }

    public String getDescription() {
        return (isFree()) ? descriptions[0] : descriptions[1];
    }


    public long getDuration() {
        return this.duration;
    }

    public void setDuration(long duration) {
        this.duration = duration;
    }

    public boolean isFree() {
        return isFree;
    }

    public void setFree(boolean free) {
        isFree = free;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}